.custom_nav.nav_type1 {
    &>ul {
        height: var(--height);
        display: inline-flex;
        justify-content: flex-start;

        a {
            color: var(--menu-color);
        }

        li {
            padding: 0 20px;
            display: block;
            list-style-type: none;
            position: relative;

            span {
                display: flex;
                justify-content: space-between;
                height: 100%;
                align-items: center;
                color: var(--bg);
                position: relative;
                font-weight: bold;
                &:hover{
                    opacity: .7;
                    &::after{
                        width: 100%;
                    }
                }
                &::after{
                    position: absolute;
                    background: var(--menu-color);
                    height: 2px;
                    left: 0;
                    content: "";
                    bottom: 0;
                    transition: .3s width ease-in-out;
                    width: 0;
                }

                &>svg {
                    margin-left: 10px;
                    width: 12px;
                    color: var(--menu-color);
                }

                &>.nav-li-a {
                    display: flex;
                    align-items: center;
                    font-size: 15px;
                    position: relative;
                    height: 100%;
                    white-space: nowrap;
                    opacity: 1;
                    &:hover{
                        opacity: .8;
                    }

                }
            }

            &>.nav-child {
                position: absolute;
                min-width: 200px;
                background: var(--bg);
                padding: 16px 30px;
                border-radius: 12px;
                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
                box-sizing: border-box;
                opacity: 0;
                visibility: hidden;
                font-size: 14px;
                max-height: calc(100vh - 126px);
                overflow: auto;
                transform: translateY(20px);
                transition: opacity .3s, transform .3s;
                z-index: 100;

                dt{
                    i{
                        display: none;
                    }
                }

                &>a {
                    display: block;
                    line-height: 2;
                    transition: all 0.3s;
                    white-space: nowrap;
                    opacity: .6;

                    &:hover {
                        text-decoration: underline;
                        opacity: 1;
                    }
                }
            }

            &.more_link,
            &.nav-child-three {
                position: static;
            }
            &.nav-child-second{
                .nav-child{
                    dt{
                        padding: 12px 0;
                        a{
                            display: flex;
                        }
                    }
                }
            }

            &.nav-child-three {
                .nav-child {
                    width: 100%;
                    left: 0;
                    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
                    border-radius: 0px;
                    background: var(--bg);
                    padding: 0;
                    max-height: calc(100vh - 126px);
                    overflow: auto;
                    position: absolute;

                    .nav_container_wrapper {
                        display: flex;
                        flex-wrap: wrap;
                        padding: 20px 50px;
                        box-sizing: border-box;

                        dl {
                            width: 25%;
                            margin-bottom: 30px;

                            a {
                                display: block;
                                line-height: 2;
                                transition: all 0.3s;
                                position: relative;

                                &:hover {
                                    text-decoration: underline;
                                    color: var(--menu-color);
                                }
                            }

                            dt {
                                margin-bottom: 5px;

                                a {
                                    font-size: 16px;
                                }
                            }

                            dd {
                                a {
                                    font-size: 14px;
                                    opacity: .6;

                                    &:hover {
                                        opacity: 1;
                                    }
                                }
                            }
                        }
                    }
                }
            }

            &:hover {
                &>.nav-child {
                    opacity: 1;
                    visibility: visible;
                    transition: opacity 0.3s;
                    transform: translateY(0);
                    background-color: var(--bg);
                    left: 0;
                }
            }
        }

    }
}

.custom_nav.nav_type2 {
    &>ul {
        height: var(--height);
        display: inline-flex;
        justify-content: flex-start;

        a {
            color: var(--menu-color);
        }

        li {
            padding: 0 20px;
            display: block;
            list-style-type: none;
            z-index: 99;

            &:hover {
                .nav-child {
                    display: block;
                }
            }

            span {
                display: flex;
                justify-content: space-between;
                height: 100%;
                align-items: center;

                &>i {
                    margin-left: 10px;
                }

                &>.nav-li-a {
                    display: flex;
                    align-items: center;
                    font-size: 16px;
                    position: relative;
                    height: 100%;
                    white-space: nowrap;

                    &::after {
                        content: "";
                        position: absolute;
                        left: 0;
                        bottom: 0;
                        display: block;
                        width: 0;
                        height: 3px;
                        background-color: #333;
                        transition: width .2s;
                    }
                }
            }
            &.nav-child-three {
                .nav-child{
                    position: absolute;
                }
            }

            .nav-child {
                display: none;
                position: absolute;
                box-shadow: 0 0 2px #ddd;
                max-width: 350px;
                min-width: 180px;
                max-height: 450px;
                overflow-y: scroll;
                padding: 10px 20px;
                background-color: var(--bg);
                &>.nav_container_wrapper{
                    dl{
                        margin: 5px 0;
                        dt{
                            display: flex;
                            align-items: center;
                            justify-content: space-between;
                            cursor: pointer;
                            i{
                                display: inline-block;
                                transform: rotate(-90deg);
                            }
                        }
                        dd{
                            line-height: 1.5;
                            opacity: .6;
                            margin: 5px 0;
                            display: none;
                        }
                    }
                }
            }
        }
    }
}

.custom_nav {
    height: var(--height);
    &>ul {

        //more menu
        li.more_link {
            padding: 0 20px;
            display: block;
            list-style-type: none;
            z-index: 99;

            &>span {
                display: flex;
                justify-content: space-between;
                height: 100%;
                align-items: center;
            }

            .more_link_child {
                width: 100%;
                max-height: calc(100vh - 126px);
                overflow: auto;
                background: var(--bg);
                position: absolute;
                left: 0;
                box-shadow: 2px 0px 2px #ddd;
                opacity: 0;
                visibility: hidden;


                &>.nav_container_wrapper {
                    display: flex;
                    flex-wrap: wrap;
                    overflow: hidden;
                    padding: 20px 50px;

                    &>ul {
                        padding: 30px 0;
                        width: 25%;
                        &>li {
                            &>span {
                                &>.nav-li-a {
                                    white-space: normal;
                                }
                            }
                        }

                        li {
                            &.on {
                                span {
                                    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.1);
                                }
                            }

                            span {
                                display: flex;
                                justify-content: space-between;
                                height: 100%;
                                align-items: center;
                                padding: 10px;
                                box-sizing: border-box;
                                transition: all 0.3s;
                                min-height: 40px;
                                cursor: pointer;
                                &::after{
                                    display: none;
                                }

                                svg {
                                    transform: rotate(-90deg);
                                    flex-shrink: 0;
                                }

                                .nav-li-a {
                                    display: flex;
                                    justify-content: space-between;
                                    align-items: center;
                                }

                                &:hover {
                                    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.1);
                                }
                            }

                            .nav-child {
                                opacity: 0;
                                visibility: hidden;
                                height: 0;

                            }
                        }
                    }

                    &>.nav-child {
                        padding: 30px 20px;
                        width: 75%;
                        box-sizing: border-box;

                        &>a {
                            display: block;
                            height: 34px;
                            line-height: 34px;
                            opacity: .6;

                            &:hover {
                                opacity: 1;
                            }
                        }

                        &>.nav_container_wrapper {
                            display: flex;
                            flex-wrap: wrap;
                            overflow: hidden;
                            gap: 20px;

                            dt {
                                font-size: 16px;
                                margin-bottom: 5px;
                                line-height: 2;
                                i{
                                    display: none;
                                }

                                a {
                                    &:hover {
                                        text-decoration: underline;
                                    }
                                }

                            }

                            dd {
                                a {
                                    line-height: 2;
                                    opacity: .6;
                                    transition: all 0.3s;

                                    &:hover {
                                        text-decoration: underline;
                                        opacity: 1;
                                    }
                                }
                            }
                        }
                    }
                }
            }

            &:hover {
                .more_link_child {
                    opacity: 1;
                    visibility: visible;
                    transition: opacity 0.3s;
                }
            }
        }
    }
}